﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>房屋详细信息</title>
 <script src="Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
 <script type="text/javascript">
$(document).ready(function(){  
   var HID=GetQueryString("HID");  
   
   var imgurl="";
    $.post("/RealHouse/HouseInfo",{"HID":HID} , function(data){
	      var data=$.parseJSON(data);
		  $("#location").html("&nbsp&nbsp区域："+data.location);
		   $("#Area").html("&nbsp&nbsp面积："+data.area+"平方米");
		    $("#Arrow").html("&nbsp&nbsp朝向："+data.arrow);
			 $("#Floor").html("&nbsp&nbsp楼层："+data.floor);
			  $("#price").html("&nbsp&nbsp价格："+data.housePrice+"元/每平米");
			   $("#address").html("&nbsp&nbsp位置："+data.premise);
			    $("#Type").html("&nbsp&nbsp户型："+data.type);
				imgurl="images/Type/"+data.type+"-"+data.area+"平方米"+".jpg";
				  $("#img").attr("src",imgurl);
				   $("#imgBig").attr("src",imgurl);
	}).complete(function(){
	$("#img").hover(function(){
	$("#Tips").fadeIn(100)});
	$("#img").mouseleave(function(){
	$("#Tips").fadeOut(100);});
	$("#img").click(function(){
	$("#Cover").fadeIn(500);
   $("#imgBig").fadeIn(500);});
    $("#imgBig").click(function(){$("#imgBig").fadeOut(500);
		$("#Cover").fadeOut(500);})
	});
  function   GetQueryString(name)   
   {   
     var  reg= new  RegExp("(^|&)"+name +"=([^&]*)(&|$)");   
     var  r=  window.location.search.substr(1).match(reg);   
     if (r!=null)
	 return  unescape(r[2]); 
	 return  null;   
	}
	$("#container").click(function(){
		$(window.parent.document).find("#detail").fadeOut(500);
	});
});
 </script>
         <link href="CSS/Detail.css" rel="stylesheet" type="text/css" />
</head>
<body>

<table  id="HouseDetail" >
<tr>
<th>户型图</th>
<th>详细信息</th>
</tr>
<tbody>
  <tr  >
  <th rowspan="8" ><img  id="img" src="" align="left" ></img>
  <div id="Tips">点击图片放大</div>
  </th>
  </tr>
  <tr><td id="location">位置:</td></tr>
  <tr><td id="address">地址:</td></tr>
  <tr><td id="price">价格:</td> </tr>
  <tr><td id="Type">户型:</td></tr>
  <tr><td id="Area">面积:</td></tr>
  <tr><td id="Floor">楼层:</td></tr>
  <tr><td id="Arrow">朝向:</td></tr>  
  </tbody>
  </table>
  
  <img  id="imgBig" src="" align="left" ></img>
  <div id="Cover"><div>

</body>
</html>